﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>try...catch</title>
    <script>
        try {
            document.write(str);
        } catch (e) {
            var myError = "";
            for (let i in e) {
                myError += i + ":" + e[i] + "\n";
            }
            alert(myError);
        }
    </script>
</head>
<body>

</body>
</html>